package com.rybbaby.tss.platform.sysPreserve.dao;

import com.rybbaby.tss.core.bean.TableBean;
import com.rybbaby.tss.core.bean.TableColumnBean;
import com.rybbaby.tss.core.web.dao.IGenericDao;
import com.rybbaby.tss.platform.sysPreserve.pojo.ExecSqlResult;

import java.sql.SQLException;
import java.util.List;


/**
 * @author 谢进伟
 * @description
 * @createDate 2017/2/28 14:02
 */
public interface IDatabasePreserveDao extends IGenericDao<Object> {
	
	/**
	 * 获取当前连接的所有表
	 * 
	 * @return
	 */
	List<TableBean> getAllTables();
	
	/**
	 * 获取指定库的指定表的列
	 * 
	 * @param catalog
	 *            方案名称
	 * @param tableName
	 *            表名
	 * @return
	 */
	List<TableColumnBean> getTableColumns(String catalog, String tableName) throws ClassNotFoundException , SQLException , InstantiationException , IllegalAccessException;
	
	/**
	 * 执行sql
	 * 
	 * @param sqls
	 *            sql语句，多个sql语句用;隔开
	 * @return
	 */
	List<ExecSqlResult> executeSql(String sqls);
}
